package com.asohofrucol.web;

import org.springframework.beans.factory.annotation.Autowired;

import com.asohofrucol.dto.GenericFieldDTO;
import com.asohofrucol.service.FormService;

public class FormFieldController {
	
	@Autowired
	FormService formService;

	private GenericFieldDTO genericField;
	
	public FormFieldController(){
		genericField = new GenericFieldDTO();
	}

	public Long getIdField() {
		return genericField.getFieldId();
	}

	public void setIdField(Long idField) {
		genericField.setFieldId(idField);
		genericField =  formService.getFormField(idField,1L);		// 1L para probar traer el combo con los datos guardados en forminputanswer de formanswer id = 1L
	}

	public GenericFieldDTO getGenericField() {
		return genericField;
	}

	public void setGenericField(GenericFieldDTO genericField) {
		this.genericField = genericField;
	}


}
